Monkey Documentation

App config settings

App config settings are settings that affect how a project is built.

These are used for features that are highly target specific, or that somehow affect the build process in some way and can't be implemented using plain Monkey code.

There are 3 ways to specify app config settings:

  • With Trans using the command line.
  • In Monkey source code using the preprocessor, eg: #MOJO_AUTO_SUSPEND_ENABLED=False. Settings made this way will not overwrite settings passed to Trans.
  • By editing the CONFIG.MONKEY text file in your apps .build/target folder. Settings in CONFIG.MONKEY will not overwrite any settings passed to Trans or in Monkey source code, so this provides a mechanism for defining 'default' settings.
The following app config settings are currently supported:

'Data file filters, examples shown, actual allowable values depend on target
'
#TEXT_FILES="*.txt|*.xml|*.json"
#IMAGE_FILES="*.png|*.jpg"
#SOUND_FILES="*.wav|*.ogg"
#MUSIC_FILES="*.wav|*.ogg"
#BINARY_FILES="*.bin|*.dat"
#FAST_SYNC_PROJECT_DATA=True            'Set to True to enable 'fast syncing' of project data when building - warning: has problems with xcode, False by default.

'Mojo settings, defaults shown
'
#MOJO_AUTO_SUSPEND_ENABLED=True         'Set to True to cause app to suspend when desktop window loses focus.
#MOJO_HICOLOR_TEXTURES=True 
#MOJO_IMAGE_FILTERING_ENABLED=True

'Html5 settings, defaults shown
'
#HTML5_WEBAUDIO_ENABLED=True            'Set to false to disable webaudio support for mojo audio, and to use older multimedia audio system instead.

'GLFW settings, defaults shown
'
#GLFW_USE_MINGW=True                    'Set to false on Windows to use MSVC instead of MinGW to build glfw apps.
#GLFW_WINDOW_TITLE="Monkey Game"
#GLFW_WINDOW_WIDTH=640                  'Set this and HEIGHT to 0 for a 'windowless' glfw app
#GLFW_WINDOW_HEIGHT=480 
#GLFW_WINDOW_RESIZABLE=False
#GLFW_WINDOW_FULLSCREEN=False
#GLFW_WINDOW_SAMPLES=0                  'Set to number of samples for multisampling (glfw3 only).
#GLFW_WINDOW_DECORATED=True             'Set to false to create a broderless window (glfw3 only).
#GLFW_VERSION=2                         'Set to GLFW version, ie: 2 or 3.

#GLFW_APP_LABEL="My App"                'Human readable label for app.
                                        'Must be set for monkey://internal to map to 'per user' app data dir.
                                        'If not set (the default), monkey://internal is shared by all users of app.
                                        'monkey://external is ALWAYS shared by all users of app.
                                        'Must contain filesystem friendly chars only - generally, [A-Z], [a-z], [0-9],
                                        '<space>, <underscore> <minus>, <dot> should be OK.
#GLFW_APP_PUBLISHER="My Company"        'Optional human readable publisher name for app. Must be filesystem friendly.
                                        'Not defined by default.


'XNA settings, defaults shown
'
#XNA_WINDOW_WIDTH=640
#XNA_WINDOW_HEIGHT=480
#XNA_WINDOW_WIDTH_XBOX=640
#XNA_WINDOW_HEIGHT_XBOX=480
#XNA_WINDOW_WIDTH_PHONE=320
#XNA_WINDOW_HEIGHT_PHONE=480
#XNA_WINDOW_RESIZABLE=False
#XNA_WINDOW_FULLSCREEN=False

'IOS settings, defaults shown
'
#IOS_RETINA_ENABLED=True
#IOS_ACCELEROMETER_ENABLED=True
#IOS_DISPLAY_LINK_ENABLED=False

'Android settings, defaults shown
'
#ANDROID_APP_LABEL="Monkey Game"
#ANDROID_APP_PACKAGE="com.monkeycoder.monkeygame"
#ANDROID_SCREEN_ORIENTATION="portrait"              'one of: user, portrait, landscape
#ANDROID_VERSION_CODE="1"
#ANDROID_VERSION_NAME="1.0"
#ANDROID_NATIVE_GL_ENABLED=False                    'for use with the opengl modules
#ANDROID_KEY_STORE="../../release-key.keystore"
#ANDROID_KEY_ALIAS="release-key-alias"
#ANDROID_KEY_STORE_PASSWORD="password"
#ANDROID_KEY_ALIAS_PASSWORD="password"
#ANDROID_SIGN_APP=False

'OpenGL settings. To override, set these in your code BEFORE importing opengl.gles11 or opengl.gles20
'
#OPENGL_DEPTH_BUFFER_ENABLED=True

'Reflection settings
'
#REFLECTION_FILTER=""

'Admob settings, defaults shown
'
#ADMOB_PUBLISHER_ID="abcdabcdabcdabc"                           'from your admob account
#ADMOB_ANDROID_TEST_DEVICE1="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE2="ABCDABCDABCDABCDABCDABCDABCDABCD"  'your device's admob ID for test mode
#ADMOB_ANDROID_TEST_DEVICE3=""
#ADMOB_ANDROID_TEST_DEVICE4=""

'C++ settings, defaults shown
'
#CPP_DOUBLE_PRECISION_FLOATS=False  'Set to True to enable 64 bit floats.
#CPP_GC_MODE=1                      '0 disable GC, 1=incremental collect after every OnWhatever, 2=Incremental collect every GC allocation
#CPP_GC_TRIGGER=8388608             'Allocated memory (in bytes) before a GC 'sweep' occurs. Defaults to 8 MiB
#CPP_GC_MAX_LOCALS=8192             'This is used with GC_MODE 2 to track local object vars and defaults to 8192

'Misc
'
#CC_OPTS=""                         'additional gcc options for stdcpp target, eg: #CC_OPTS+="-DMyDefine"

Not all settings are supported by all targets, and when not supported they will silently fail.